﻿@model IEnumerable<string>

<ul>
    <li id="menutitle">
        产品分类
    </li>
    <li>
        @Html.RouteLink("Home", new {controller="Product",action="List"}, new { @class = ViewBag.SelectedCategory == null ? "selected" : null })
    </li>

    @foreach (var link in Model)
    {
        var i = string.Empty;
        i = link == @ViewBag.SelectedCategory ? "class=selected" : string.Empty;

        <li @i>        

            @Html.RouteLink(link, new { controller = "Product", action = "List", category = link, page = 1 }, 
                            new{@class=link ==ViewBag.SelectedCategory?"selected":null})
        </li>
    }

</ul>